home *** CD-ROM | disk | FTP | other *** search
/ Introduction to 3D Game …ogramming with DirectX 12 / Introduction-to-3D-Game-Programming-with-DirectX-12.ISO / Code.Textures / Chapter 7 Drawing in Direct3D Part II / Shapes / FrameResource.cpp next >
Encoding:
C/C++ Source or Header  |  2016-03-02  |  483 b   |  16 lines

  1. #include "FrameResource.h"
  2.  
  3. FrameResource::FrameResource(ID3D12Device* device, UINT passCount, UINT objectCount)
  4. {
  5.     ThrowIfFailed(device->CreateCommandAllocator(
  6.         D3D12_COMMAND_LIST_TYPE_DIRECT,
  7.         IID_PPV_ARGS(CmdListAlloc.GetAddressOf())));
  8.  
  9.     PassCB = std::make_unique<UploadBuffer<PassConstants>>(device, passCount, true);
  10.     ObjectCB = std::make_unique<UploadBuffer<ObjectConstants>>(device, objectCount, true);
  11. }
  12.  
  13. FrameResource::~FrameResource()
  14. {
  15.  
  16. }